<div class="column-left">
    <!-- HEADER -->
    <?php echo image_tag("/uploads/team/".$team->getDefImg(), array('alt'=>$team, 'style'=>'max-width:350px;max-height:250px;float:left;padding:0px 10px 10px 10px;border:1px solid #eee;'))?>
      <h6 style="padding:5px 10px 10px 10px;color:#000;"><?php echo $team->getTName()?> баг &nbsp;| <?php echo $team->getTCity()?> компани</h6>
           
    <div style="margin-left:15px;" class="left">
        <br clear="all">
    	<hr style="border:0;border-top:1px solid #eee;"/>
        
        <?php echo $team->getTDescr()?>
    </div>
    
    <br clear="all">
    <br clear="all">
    
   <!-- TABS -->
    <div class="tabs" id="tabs-player">
<!--      <div class="tab active" id="tab-news">Мэдээ</div>-->
      <div class="tab active" id="tab-players">Тоглогчид</div>
      <div class="tab" id="tab-result-schedule">Хуваарь, Дүн</div>
      <div class="tab" id="tab-photo">Зураг</div>
      <div class="tab" id="tab-video">Видео</div>
      <hr class="separator"/>
      <!--<div class="c active dot-list" id="tab-news-c">
		  <?php //$pager = Doctrine::getTable('News')->getPager(array('objectType'=>'', ))?>
          <?php //include_partial('content/newslist', array('newss'=>$pager->getResults()));?>
          <br clear="all">
          <?php //echo pager_navigation($pager, 'team/show?name='.$team->getTName())?>
      </div>-->
      <div class="c active" id="tab-players-c">
	  	  <?php $players = Doctrine::getTable('BbPlayers')->fetchall(array('team_id'=>$team->getId()))?> 
	      <table width="100%" class="mod-data">
	          		<thead>
	          			<tr>
	          				<th scope="col">Тоглогч</th>
	          				<th scope="col">Байрлал</th>
	          				<th class="textright" scope="col">Төрсөн Он</th>
	          				<th class="textright" scope="col">Туршлага</th>
	          			</tr>
	          		</thead>
	          		<tbody>
	          		 <?php foreach ($players as $player):?>
	          			<tr class="player-46-615">
	          				<td>
	          					<a href="<?php echo url_for('player/show?seasonId='.$seasonId.'&nick='.$player->getNick())?>">
										<?php echo $player->getFullname(); ?>
								</a>
	          				</td>
	          				<td>
	          					<?php echo $player->getBbPositions() ?>
	          				</td>
	          				<td class="textright">
	          					<?php echo $player->getBirthday() ?>
	          				</td>
	          				<td class="textright">
	          					<?php echo $player->getExperience() ?>
	          				</td>
	          			</tr>
	          		<?php endforeach?>
	          		</tbody>
	       </table>
      </div>
      <div class="c" id="tab-result-schedule-c">
           <?php 
           		 $matches = Doctrine::getTable('BbMatch')->fetchall(array('team1_id'=>$team->getId())); 
           		 $matchdays = Doctrine::getTable('BbMatchday');
           		 $teams = Doctrine::getTable('BbTeams');
           ?> 
	      <table width="100%" class="mod-data">
	          		<thead>
	          			<tr>
	          				<th scope="col">Огноо</th>
	          				<th scope="col">Эсрэг Баг</th>
	          				<th style="align:center;" scope="col">Дүн</th>
	          			</tr>
	          		</thead>
	          		<tbody>
	          		 <?php foreach ($matches as $match):?>
	          			<tr class="player-46-615">
	          				<td>
	          					<?php echo $matchdays->findOneById($match->getMId()); ?>	
							</td>
	          				<td>
	          					<?php echo $teams->findOneById($match->getTeam2Id()) ?>
	          				</td>
	          				<td style="align:center;">
	          					<?php echo link_to($match->getScore1().'-'.$match->getScore2(), '@match_show?id='.$match->getId()); ?>
	          				</td>
	          			</tr>
	          		<?php endforeach?>
	          		</tbody>
	       </table>
      </div>
      <div class="c" id="tab-photo-c">
          <?php include_partial('content/album', array('objectType'=>'team','objectId'=>$team->getId()));?>
      </div>
      <div class="c" id="tab-video-c">
        	<?php include_partial('content/video', array('objectType'=>'team','objectId'=>$team->getId()));?>
      </div>
    </div><!--tabs-->
    
    <br clear="all">
   
    <?php //include_partial('comment/comments', array('objectType'=>'team', 'objectId'=>$team->getId()));?>
</div>

<?php include_partial('main/right', array());?>

<br clear="all">